package com.dogdog.activity;

import java.util.Timer;
import java.util.TimerTask;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;

/**
 * 欢迎界面
 * @author jay
 *
 */
public class SplashActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.welcome);
		getHomeActivity();
	}
	
	/**
	 * 写个计时器，2.5秒后跳转到主界面
	 */
	private void getHomeActivity() {
        Timer timer = new Timer();
        TimerTask task = new TimerTask() {
            public void run() {
                Intent intent = new Intent(SplashActivity.this, Hand_login.class);
                startActivity(intent);
                overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
                finish();
            }
        };
        timer.schedule(task, 1500);
    }
}
